package com.qf.test;

import com.qf.pojo.User;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * projectName: Spring
 *
 * @author: MaTianWei
 * time: 2021/6/28 14:38
 * description:
 */

public class Demo {
    @Test
    public void test1(){
        //1·创建Spring工厂
        ClassPathXmlApplicationContext ac = new ClassPathXmlApplicationContext("classpath:applicationContext.xml");
        //2·获取user
        User user = (User) ac.getBean("user");
        //3·输出内容
        System.out.println(user);
        //4·关闭
       ac.close();
    }
    @Test
    public void test2(){

    }
    @Test
    public void test3(){

    }
}

